import request from '@/utils/request'

// 获取员工列表
export function getEmployeeList(params) {
  return request({
    url: '/sys/user',
    methods: 'GET',
    params
  })
}
// 新增员工
export function addEmployeeList(data) {
  return request({
    url: '/sys/user',
    methods: 'POST',
    data
  })
}
// 删除
export function delEmployee(id) {
  return request({
    url: `/sys/user/${id}`,
    method: 'delete'

  })
}
// 导入
export function getImportExvel(data) {
  return request({
    url: '/sys/user/batch',
    method: 'post',
    data

  })
}
// 修改员工信息
export function eidtDetailUsernmae(data) {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'put',
    data

  })
}
// 分配员工角色
export function fetchAssignRole(data) {
  return request({
    url: '/sys/user/assignRoles',
    method: 'put',
    data

  })
}
